package com.atguigu.gulimall.order.Feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.order.vo.MemberAddressVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;

@FeignClient("gulimall-member")
public interface MemberFeignService {

    @GetMapping("/member/memberreceiveaddress/info/address")
     List<MemberAddressVo> getAddress(@RequestParam("memberId")Long memberId);

    @RequestMapping("/member/memberreceiveaddress/info/{id}")
     R getCharge(@PathVariable("id") Long id);

    /**
     * 获取运费
     * @param addrId
     * @return
     */
    @GetMapping("/member/memberreceiveaddress/getFreightAmount")
     BigDecimal getFreightAmount(@RequestParam("memberId")Long addrId);
}
